//package test6;
//
///**
// * Created with IntelliJ IDEA.
// * Description:
// * User: Hua YY
// * Date: 2025-02-05
// * Time: 13:24
// */
//class Person{
//    public String name;
//    public int age;
//    public Address address;
//    public Person(String name , int age , Address address){
//        this.name = name;
//        this.age = age;
//        this.address = address;
//    }
//    public Person (Person person){
//        this.name = person.name;
//        this.age = person.age;
//        this.address = new Address(person.address.city);
//    }
//}
//class Address{
//    public String city;
//    public Address(String city){
//        this.city = city;
//    }
//}
//public class Test1 {
//    public static void main(String[] args) {
//        Address address = new Address("杭州");
//        Person person1 = new Person("张三",18,address);
//        Person person2 = new Person(person1);
//        System.out.println(person1.address == person2.address);
//
//        Person person3 = new Person("李四",30,address);
//        System.out.println(person1.address == person3.address);
//    }
//}
